package com.android.thought.badboys.Info;

import java.io.Serializable;
import java.util.ArrayList;

import android.util.Log;

/**
 * 관리 번호에에 대한 파일 구리.
 * @author Choonghwan
 *
 */
public class DataConversion implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -3410387090717587625L;

	/*
	 * 관리 번호
	 */
	PhoneInfo mPhoneInfo ;
	

	ArrayList<MessageInfo> mMessageGroupInfo = null;

	ArrayList<CallInfo> mCallGroupInfo = null;

	
	public PhoneInfo getPhoneInfo ( ) { 
		return this.mPhoneInfo ;
	}
	
	
	public boolean isCompatePhoneInf(PhoneInfo info) { 
		Log.i("CH_DEBUG", mPhoneInfo.getPhoneNumber() + " ::: " + info.getPhoneNumber() );
		if( mPhoneInfo != null && mPhoneInfo.getPhoneNumber().equals(info.getPhoneNumber()) ) {
			return true;
		}
		
		return false;
	}
	public void setPhoneInfo ( PhoneInfo info) { 
		this.mPhoneInfo = info;
	}
	
	
	public void addMessageInfo (MessageInfo info ) { 
		if (mMessageGroupInfo == null)
			mMessageGroupInfo = new ArrayList<MessageInfo>();
		
		mMessageGroupInfo.add(info);
	}
	

	public void addCallInfo (CallInfo info ) { 
		if (mCallGroupInfo == null)
			mCallGroupInfo = new ArrayList<CallInfo>();
		
		mCallGroupInfo.add(info);
	}
	
	
	public ArrayList<MessageInfo> getMessageGroupInfo() {
		if (mMessageGroupInfo == null)
			mMessageGroupInfo = new ArrayList<MessageInfo>();

		return mMessageGroupInfo;
	}

	public ArrayList<CallInfo> getCallGroupInfo() {
		if (mCallGroupInfo == null)
			mCallGroupInfo = new ArrayList<CallInfo>();

		return mCallGroupInfo;
	}
}
